package org.one.afternoon.provider.detection_ai;

import com.dtflys.forest.annotation.Body;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.annotation.Var;
import org.one.afternoon.domain.dto.Result2BackDto;
import org.one.afternoon.domain.dto.Swim2BackDto;
import org.one.afternoon.domain.dto.SwimmingDto;

public interface DetectionProvider<T> {
    @Get(
            url = "http://{ip}/ImagePath?source_image={source_image}",
            headers = {
                    "Content-Type: application/x-www-form-urlencoded",
                    "Accept: */*"
            }
    )
    SwimmingDto detectObject(@Var("ip") String ip, @Var("source_image") String path);

    @Post(
            url = "http://172.19.0.82:8080/swimming/image",
            headers = {
                    "Content-Type: application/json",
                    "Accept: */*"
            }
    )
    Result2BackDto<T> pushImage(@Body Swim2BackDto swim2BackDto);
}
